home *** CD-ROM | disk | FTP | other *** search
- Path: castle.nando.net!news
- From: actuary@nando.net (Bill McCarthy)
- Newsgroups: comp.lang.c
- Subject: Re: A problem with fprintf
- Date: 9 Jan 1996 00:46:28 GMT
- Organization: News & Observer Public Access
- Message-ID: <4csdt4$mcn@castle.nando.net>
- References: <4cs8ie$5ru@no-names.nerdc.ufl.edu>
- Reply-To: actuary@nando.net (Bill McCarthy)
- NNTP-Posting-Host: grail1217.nando.net
- X-Newsreader: IBM NewsReader/2 v1.2
-
- In <4cs8ie$5ru@no-names.nerdc.ufl.edu>,
- vtigadi@cis.ufl.edu (Vishwajit Tigadi) writes:
- >
- >I am experiencing a peculiar problem with fprintf.
- >I have a piece of code where the following statement fits in:
- >
- >fprintf(fp, "%s\n", src);
- >
- >fp is a file-pointer and src is a static array of characters. When the
- >code is executed repeatedly, it fails at the above statement. The error
- >message from the debugger is as follows:
-
- %s expects a string, not merely an array of characters -- but a nul ('\0')
- terminated one.
-
- Bill McCarthy
- actuary@nando.net
- Wendell, NC USA
-
-